<?php

namespace app\after\controller;

use think\Controller;
use think\Request;
use think\Session;

class Base extends Controller
{
//   书写一个token基类
public function __construct(Request $request = null)
{
    parent::__construct($request);
    $token = Session::get('token');
    if ($token){
        $this->error('请先获取token的值再去访问其他页面','/after/after/login');
    }
    $res =\Token::verify_token($token);
    $this->error('token的值不正确，请重新获取','/after/after/login');
}
}
